<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    /*
    # 9、去除数组1[1,2,3,4,5]与数组2[1,3,5,7,9]中共同的元素
    */
    let number=[1,2,3,4,5];
    let number1=[1,3,5,7,9];
    for(let i=0;i<number.length;i++){
        let log=number1.indexOf(number[i]);
        if(log!=-1){
            number.splice(i,1);
            number1.splice(log,1);
            i--;
        }
    }
    console.log(number);
    console.log(number1);
</script>
</html>